﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using SvnCore;

namespace SVNTreeViewer.Views
{
    /// <summary>
    /// Interaction logic for Loading.xaml
    /// </summary>
    public partial class Loading : UserControl
    {
        public Loading()
        {
            InitializeComponent();
        }

        public void AddInfo(string info)
        {
            foreach (TextBlock txt in this.LoaderInfo.FindChildren<TextBlock>())
            {
                txt.Foreground = new SolidColorBrush(Colors.Gray);
            }

            this.LoaderInfo.Children.Add(
                new TextBlock()
                    {
                        Text = info,
                        TextAlignment = TextAlignment.Center,
                        Foreground = new SolidColorBrush(Colors.WhiteSmoke)
                    });

            this.LoaderInfo.UpdateLayout();
        }
    }
}
